<template>
	<view class="mt30 bgcf pb12 bdr20 m30" style="border-radius: 20rpx;line-height: 66rpx;">
		<view class="p24" style="padding-bottom: 0;">
			<view class="df jcsb aic fs26 bdm">
				<text class="c6 ">商品金额</text>
				<text class="c3">￥{{isHaveStock==0?'--':priceAll||0}}</text>
			</view>
			<view class="df jcsb aic fs26 bdm">
				<text class="c6 ">优惠金额</text>
				<view class="c3">
					<view class="fs26 " v-if="!couponList.length">-￥0.00</view>
					<view class="c3 fs26 df aic" v-else  @click="handleCoupon">
						<view v-if="currentInfoCoupon.conditionMoney">
							满<text class="price fwb">{{currentInfoCoupon.conditionMoney}}</text>减<text class="price fwb">{{currentInfoCoupon.reduceMoney}}</text>元
						</view>
						<view class="" v-else>
							请选择优惠券
						</view>
						<nmr-icon name="xiangyou1" size="28" style="margin-left: auto;"
							color="#666666"></nmr-icon>
					</view>
				</view>
			</view>
			<view class="df jcsb aic fs26 ">
				<view class="">
					<text class="c6 ">配送费</text><u-icon name="question-circle" color="#48A147" class="ml5" @click="$emit('feeInfo')"></u-icon>
				</view>
				<view class="df aic" @click="$emit('FeePrice')">
					<text class=" price">+￥{{deliveryFee || '0.00'}}</text> <u-icon name="arrow-right" color="#666666" size="22"></u-icon>
				</view>
			</view>
			<!-- <view class="df jcsb aic fs26">
				<text class="c6 ">包装费</text>
				<text class="c3">+￥{{orderInfo.packageMoney || '0.00'}}</text>
			</view> -->

		</view>
		<view class="borCe5">
		</view>
		<view class="mr30 mt12 " style="text-align: end;">
			<text class="fs26 c3">合计：</text>
			<text class="priceStyle">￥{{isHaveStock==0?'--':payAmountFee||0}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			orderInfo: {
				default: () => {},
				type: Object,
			},
			couponList: {
				default: () => [],
				type: Array,
			},
			currentInfoCoupon: {
				default: () => {},
				type: Object,
			},
			type: {
				default: 1,
				type: [String, Number],
			},
			priceAll: {
				default: 0,
				type: [String, Number],
			},
			deliveryFee: {
				default: 0,
				type: [String, Number],
			},
			payAmountFee: {
				default: 0,
				type: [String, Number],
			},
				
			isHaveStock:{
				default: 1,
				type: Number,
			}
		},

		data() {
			return {

			}
		},
		methods: {
			handleCoupon() {
				this.$emit('handleCoupon')
			}
		}

	}
</script>

<style lang="scss" scoped>
	.noneCoupon {
		padding: 2rpx 10rpx;
		background: #999999;
		border-radius: 19rpx 19rpx 19rpx;
		color: white;
		margin-right: auto;
		display: inline
	}

	.borCe5 {
		border-top: 1rpx solid #E5E5E5;
	}

	.priceStyle {
		font-size: 30rpx;
		font-family: PingFang SC-Bold, PingFang SC;
		font-weight: bold;
		color: #EF2929;
	}

	.bdm {
		border-bottom: 2rpx dashed #E5E5E5;
	}
</style>